@font-face {
  font-family: 'Press Start 2P';
  src: url('/assets/fonts/press-start-2p.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* NES.css 风格的配色 */
  --primary-color: #209cee;
  --success-color: #92cc41;
  --warning-color: #f7d51d;
  --error-color: #e76e55;
  --dark-color: #212529;
  --text-color: #212529;
  --border-color: #212529;
  --bg-color: #fff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Press Start 2P', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: #f0f0f0;
  margin: 0;
  padding: 0;
  height: 100vh;
  image-rendering: pixelated;
  /* overflow: hidden; 禁用全局滚动条 */
}

#app {
  height: 100%;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 2rem;
}

/* 像素风格的容器 */
.nes-container {
  position: relative;
  padding: 1.5rem 2rem;
  border: 4px solid var(--border-color);
  border-radius: 0;
  margin: 4px;
}

/* 带标题的容器 */
.nes-container.with-title {
  padding-top: 2rem;
}

.nes-container.with-title > .title {
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bg-color);
  padding: 0 1rem;
  font-size: 1rem;
  white-space: nowrap;
}

/* 按钮基础样式 */
.nes-btn {
  padding: 0.5rem 1rem;
  margin: 4px;
  border: 4px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  cursor: pointer;
  min-width: 8rem;
  text-align: center;
  transition: all 0.1s ease;
}

.nes-btn:hover {
  transform: scale(1.02);
}

.nes-btn:active {
  transform: scale(0.98);
}

/* 按钮变体 */
.nes-btn.is-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.nes-btn.is-success {
  background-color: var(--success-color);
  color: #fff;
}

.nes-btn.is-error {
  background-color: var(--error-color);
  color: #fff;
}

/* 输入框样式 */
.nes-input {
  width: 100%;
  padding: 0.5rem;
  border: 4px solid var(--border-color);
  border-radius: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  margin: 4px;
}

.nes-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Press Start 2P', cursive;
  margin-bottom: 1rem;
  color: var(--text-color);
}

/* 添加一些全局动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 添加过渡动画类 */
.fade-enter-active {
  animation: fadeIn 0.3s ease-out;
}

/* 添加一些全局工具类 */
.text-center {
  text-align: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-1 {
  gap: 1rem;
}

/* 修改一些 NES.css 的默认样式 */
.nes-container {
  position: relative;
  margin-bottom: 1rem;
}

.nes-container.is-dark {
  background-color: var(--dark-color);
}

.nes-container.is-rounded {
  border-radius: 4px;
}

.nes-icon {
  transform: scale(1);
  transition: transform 0.2s ease;
}

.nes-icon:hover {
  transform: scale(1.1);
}

/* 添加一些主题色变体 */
.is-primary {
  background-color: var(--primary-color) !important;
  color: #fff !important;
}

.is-success {
  background-color: var(--success-color) !important;
  color: #fff !important;
}

.is-warning {
  background-color: var(--warning-color) !important;
  color: #212529 !important;
}

.is-error {
  background-color: var(--error-color) !important;
  color: #fff !important;
}

/* 添加全局动画类 */
.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-pulse {
  animation: pulse 1s infinite;
}

.animate-shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* 添加过渡效果 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* 添加滑动效果 */
.slide-enter-active,
.slide-leave-active {
  transition: all 0.3s ease-out;
}

.slide-enter-from {
  opacity: 0;
  transform: translateX(-20px);
}

.slide-leave-to {
  opacity: 0;
  transform: translateX(20px);
}

/* 添加响应式设计 */
@media (max-width: 768px) {
  .nes-container {
    padding: 1rem;
  }

  .number {
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .login-view {
    padding: 2rem; /* 增加大屏幕的内边距 */
  }
}
